home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 2
/
Amoszine 2.adf
/
MORE_SOURCE_CODE
/
Digi_Clock.AMOS
/
Digi_Clock.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-02-26
|
2KB
|
74 lines
Rem
Rem Runs a clock in the top right corner using bobs running under amal.
Rem Stops running after 60 seconds.
Rem
Rem DAVID PICKIN
Rem
Curs Off : Cls 0
Load "Clock.abk"
Colour 15,$FFF
Rem Clock
ZT$="Let RI=0 ; Let A=1 ;"
ZT$=ZT$+"A: Let A=1+RI ;"
ZT$=ZT$+"Jump A ;"
Rem
ZH$="Let RH=0 ; Let A=1 ;"
ZH$=ZH$+"A: Let A=1+RH ;"
ZH$=ZH$+"Jump A ;"
Rem
Z1$="Let RF=0 ; Let A=1 ;"
Z1$=Z1$+"A: Let A=1+RF ;"
Z1$=Z1$+"Jump A ;"
Rem
Z0$="Let RG=0 ; Let A=1 ;"
Z0$=Z0$+"A: Let A=1+RG ;"
Z0$=Z0$+"Jump A ;"
Rem
Rem * clock on *
Bob 20,250,8,1 : Channel 7 To Bob 20 : Amal 7,Z1$
Bob 21,260,8,1 : Channel 8 To Bob 21 : Amal 8,Z0$
Rem T&H
Bob 22,276,8,1 : Channel 9 To Bob 22 : Amal 9,ZT$
Bob 23,286,8,1 : Channel 10 To Bob 23 : Amal 10,ZH$
Bob 24,268,8,11
Timer=0 : VV#=0
Double Buffer
Amal On
Rem
Do
Synchro
Rem * clock *
Rem If Amreg(1)=1 or X Bob(1)>89 Then Goto JKU
VV#=Timer : VV#=VV#/50 : Rem seconds
C=Abs(VV#)
If C>59 Then Goto QIUT : Rem too long over a minute
If C<10 : Amreg(6)=C : C2=C : End If : Rem
If C>9
C1=C/10 : C1=Abs(C1) : Amreg(5)=C1
C2=(C-(C1*10)) : Amreg(6)=C2
End If
A=Abs(VV#) : A#=(VV#-A)*10 : A=Abs(A#) : Amreg(8)=A : Rem tenths
B=Abs(VV#) : B#=(VV#-B)*10 : B=Abs(B#) : B#=(B#-B)*10 : B=Abs(B#) : Amreg(7)=B : Rem Hundreths
JKU:
If C=10 Then Ink 15,0 : Text 120,100,"Hello AVE"
If Mouse Key=2 Then Goto QIUT
Loop
QIUT:
Rem * clock *
M1$=""
If C1>0 : M1$=Right$(Str$(C1),1) : End If
M2$=Right$(Str$(C2),1)
T$=Right$(Str$(A),1) : H$=Right$(Str$(B),1)
T$=M1$+M2$+"."+T$+H$
Rem I=I Bob(18)
Amal Off : Rem Bob Off
Rem
QT:
Rem Screen Open 0,320,256,32,Lowres : Rem Remove Double Buffer
Palette $0,$111,$222,$333,$444,$555,$666,$777,$888,$999,$AAA,$BBB,$CCC,$DDD,$EEE,$FFF,$222,$777
Cls 0 : Flash Off : Curs Off : Ink 0 : Paint 2,2 : Colour 3,$333
VV#=Val(T$)
If GGH=20 : VV#=20 : GGH=0 : End If
T$=Str$(VV#)
Pen 15 : Paper 0 : Locate 9,20 : Print "Time =";T$;" Seconds"
End